import api from '@/api';

export default {
  namespace: 'member',

  state: {

  },

  effects: {
    *querySaleRules({ payload }, { call }) {
      return yield call(api.member.querySaleRules, payload)
    },
    *deleteSaleRules({ payload }, { call }) {
      return yield call(api.member.deleteSaleRules, payload)
    },
    *querySaleRule({ payload }, { call }) {
      return yield call(api.member.querySaleRule, payload)
    },
    *createSaleRule({ payload }, { call }) {
      return yield call(api.member.createSaleRule, payload)
    },
    *updateSaleRule({ payload }, { call }) {
      return yield call(api.member.updateSaleRule, payload)
    },
    *onlineSaleRule({ payload }, { call }) {
      return yield call(api.member.onlineSaleRule, payload)
    },
    *offlineSaleRule({ payload }, { call }) {
      return yield call(api.member.offlineSaleRule, payload)
    },
    *queryProductList({ payload }, { call }) {
      return yield call(api.member.queryProductList, payload)
    },
    *querySaleRuleStatus({ payload }, { call }) {
      return yield call(api.member.querySaleRuleStatus, payload)
    },
    *queryMemberLevel({ payload }, { call }) {
      return yield call(api.member.queryMemberLevel, payload)
    },
    *queryExchangeList({ payload }, { call }) {
      return yield call(api.member.exchange.list, payload)
    },
    *queryExchangeMonthData({ payload }, { call }) {
      return yield call(api.member.exchange.monthData, payload)
    },
  },

  reducers: {

  }
};
